package com.cool.modules.finance.entity.order;

import com.cool.core.base.BaseEntity;
import com.cool.modules.finance.constant.OrderType;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Table;
import com.tangzc.mybatisflex.autotable.annotation.ColumnDefine;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@Table(value = "finance_order",comment = "记账明细表")
public class FinanceOrderEntity extends BaseEntity<FinanceOrderEntity> {


    @ColumnDefine(comment = "记账类型", notNull = true,type = "int(11)")
    private OrderType orderType;

    @Column(ignore = true)
    private Integer orderTypeValue;

    @ColumnDefine(comment = "记账金额", notNull = true,type = "decimal(10,2)")
    private BigDecimal orderMoney;

    @ColumnDefine(comment = "记账详情",type = "text")
    private String orderDetail;

    @Column(ignore = true)
    private List<String> imageList;

    @ColumnDefine(comment = "记账账户",notNull = true,type = "bigint")
    private Long accountId;

    @Column(ignore = true)
    private String accountName;

    @ColumnDefine(comment = "币种id",notNull = true,type = "bigint")
    private Long coinId;

    @ColumnDefine(comment = "币种符号",notNull = true,type = "varchar(10)")
    private String coinSymbol;

    @ColumnDefine(comment = "记账分类",notNull = true,type = "bigint")
    private Long categoryId;

    @Column(ignore = true)
    private String categoryName;

    @ColumnDefine(comment = "家庭id",notNull = true,type = "bigint")
    private Long familyId;

    @ColumnDefine(comment = "是否日常",notNull = true,type = "tinyint(1)")
    private Boolean isDaily;

    @ColumnDefine(comment = "记账时间",notNull = true,type = "date")
    private Date orderDate;

    @ColumnDefine(comment = "创建人",notNull = true,type = "bigint")
    private Long createUser;

    @Column(ignore = true)
    private String createUserName;

    /** 记账时间区域**/
    @Column(ignore = true)
    private List<Date> dateRange;

    @Column(ignore = true)
    private boolean self;

    @Column(ignore = true)
    private BigDecimal inCome;

    @Column(ignore = true)
    private BigDecimal outCome;

}
